package com.ltedu.oss.controller;

import com.ltedu.common.vo.Result;
import com.ltedu.oss.domain.FileInfo;
import com.ltedu.oss.service.FileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: FileInfoController
 * @auther: Jerry
 * @date: 2020/11/26 15:43
 * @desctiption: TODO
 * @version: 1.0
 */
@RestController
@RequestMapping("/oss/fileInfo")
public class FileInfoController {

    @Autowired
    private FileInfoService fileInfoService;

    @RequestMapping("/add")
    public Result add(@RequestBody FileInfo fileInfo) {
        return Result.ok(fileInfoService.save(fileInfo));
    }
}
